package com.zfzs.post.model.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 录入收货地址
* @author ck
* @date 2019-09-09
*/
@Data
public class InsertAgentAreaDTO {

    /**
     * 详细地址
     */
    @NotBlank(message = "请输入详细地址")
    @Length(min = 6,message = "请输入正确的详细地址")
    private String info;

    /**
     * 姓名
     */
    @NotBlank(message = "请输入姓名")
    private String names;

    /**
     * 手机号码
     */
    @NotBlank(message = "请填写手机号码")
    @Pattern(regexp = "^1(2|3|4|5|6|7|8|9)\\d{9}$",message = "手机号码格式不正确")
    private String phone;

    /**
     * 省
     */
    @NotNull(message = "请选择省份")
    private Long province;

    /**
     * 市
     */
    @NotNull(message = "请选择城市")
    private Long city;

    /**
     * 区
     */
    @NotNull(message = "请选择区/县")
    private Long area;

    /**
     * 是否默认
     */
    private Boolean isDefault;

}